import mx.utils.Delegate;

import gugga.components.Button;

import simpleSiteWithAdditionalNavigationButton.CommonSection;

/**
 * @author bony
*/
class simpleSiteWithAdditionalNavigationButton.AboutSection extends CommonSection 
{ 
	// The AboutSection field - this is cross section button.
	private var mButtonContactUs:Button;
		
	public function AboutSection() 
	{
		super();
		
		// Get the instance from the scene.
		mButtonContactUs = getComponent("btnContactUs");
	}

	public function initUI()
	{
		super.initUI();
		
		// mButtonContactUs listens to the event click and executes the method onButtonContactUsClick.
		mButtonContactUs.addEventListener("click", Delegate.create(this, onButtonContactUsClick));
				  
        // Initialization sequence		
		// Using the CommonSection initialization sequence.
		
		// Activating sequence		
		// Using the CommonSection activating sequence.
		
		// Open sequence		
		// Using the CommonSection open sequence.
		
		// Close sequence		
		// Using the CommonSection close sequence.        
	}
	
	private function onButtonContactUsClick(ev):Void
	{
		// Dispatch "navigate" event.
		// Event is dispatched as an object created with the shortcut constructor {}. 
		// The "type" and "target" properties are obligatory. Additional property sectionID
		// is provided to hold ID of the section that should be opened.
		dispatchEvent({type: "navigate", target: this, sectionID: "Contact"});
	}
}